<template>
	<view style="margin: 10px 10px 0px 10px;">
		<u-form labelPosition="left">
			<u-form-item labelWidth="0" label="" >
				<view><u-textarea v-model="content" border="surround" placeholder="请输入反馈内容,我们会努力改进" type="text" inputAlign="right" :clearable="true"></u-textarea></view>
			</u-form-item>
		</u-form>
		<view name="底部按钮" style="margin: 20px 0px 0px 0px;"><u-button type="primary" :loading="loading" text="提交" @click="save"></u-button></view>
	</view>
</template>

<script>
import { Toast } from '@/utils/common.js';
import { IMG_SERVER, Request, VITE_API_URL } from '@/utils/request.js';
import { User } from '@/utils/user.js';
export default {
	data() {
		return {
			content:"",
		};
	},
	onLoad() {
		let _ = this;
		uni.$on('emitParams', data => {});
		console.log('feedback页面显示...');
	},
	methods: {
		//保存
		save(){
			let _ = this;
			if(!_.content){
				 Toast.error("请填写内容");
				 return;
			}
			Toast.loadingT("提交中...");
			Request.post("/api/feedback/submit",{content:_.content}).then((res)=>{
				Toast.success("提交成功");
				_.content = "";
			});
		},
	}
};
</script>

<style></style>
